package com.test.vote.response;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class CodeMsg {

    private int code;   //状态码
    private String msg; //提示信息

    public static CodeMsg SERVER_ERROR = new CodeMsg(500100, "服务端异常");
    public static CodeMsg VOTE_ERROR = new CodeMsg(22, "你已经投过票了哦");
    public static CodeMsg PSW_ERROR = new CodeMsg(222, "您输入的旧密码有误");
    public static CodeMsg LOGIN_ERROR = new CodeMsg(2212, "账号或密码错误");

    private CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
